package com.ce.pms.charge.dao.impl;


import java.util.List;

import com.ce.pms.base.dao.impl.PmsBaseDaoImpl;
import com.ce.pms.charge.dao.ILatefeeDetailDao;
import com.ce.pms.charge.model.LatefeeDetail;
import com.ce.util.BlankUtil;

public class LatefeeDetailDaoImpl extends PmsBaseDaoImpl<LatefeeDetail> implements
		ILatefeeDetailDao {
	/**
	 * 方法描述: 批量处理updateLatefeeListForLatefee
	 * @author 胡煦
	 * Create on:2008-9-24
	 * @param list
	 * @return boolean
	 * Edit author:
	 * Edit on:
	 * 修改原因：
	 */
	public boolean batchUpdateForLatefee(List<Object[]> list){
		if(BlankUtil.isBlank(list)){
			return false;
		}
		String sql = "update FEE_LATEFEE_DETAIL set LATEFEE = LATEFEE+? ,END_DATE = ? where LATEFEE_DETAIL_ID = ?";
		this.executeSQLBatch(sql, list);
		return true;
	}

	/**
	 * 方法描述: 批量处理updateLatefeeListForLatefee
	 * @author 胡煦
	 * Create on:2008-9-24
	 * @param list
	 * @return boolean
	 * Edit author:
	 * Edit on:
	 * 修改原因：
	 */
	public boolean batchUpdateLatefeesForValidity(List<Object[]> list){
		if(BlankUtil.isBlank(list)){
			return false;
		}
		String sql = "update FEE_LATEFEE_DETAIL set VALIDITY = ? where LATEFEE_DETAIL_ID = ?";
		this.executeSQLBatch(sql, list);
		return true;
	}
	/**
	 * 方法描述: 批量插入insertLatefeeDetailList
	 * @author 胡煦
	 * Create on::2008-9-25
	 * @param List<Object[]> list
	 * @return boolean
	 * Edit author:
	 * Edit on:
	 * 修改原因：
	 */
	public boolean batchInsertLatefeeDetails(List<Object[]> list){
		if(BlankUtil.isBlank(list)){
			return false;
		}
		String sql = "insert into FEE_LATEFEE_DETAIL (DERATE ,ADJUST,LATEFEE,BASE_AMT,RATE,START_DATE,END_DATE,TRANSACTION_ID,VALIDITY,M_TRANS_ID) values( ?,?,?,?,?,?,?,?,?,?)";
		this.executeSQLBatch(sql, list);
		return true;
	}

}
